package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.pojo.DtsUser;
import com.qf.vo.DayStatis;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author zhaojian
 * @since 2021-05-12
 */
public interface DtsUserMapper extends BaseMapper<DtsUser> {
    /**
     * 查询当天用户的增长数量
     * @return
     */
    @Select("SELECT" +
            "            DATE_FORMAT(a.add_time, \"%Y-%m-%d\")  dayStr , count(*) cnts " +
            "            FROM" +
            "            dts_user AS a " +
            "            WHERE deleted=0 " +
            "            GROUP BY DATE_FORMAT(a.add_time,\"%Y-%m-%d\")")

    public List<DayStatis>  staticIncreaseUser();

}
